<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>slibc: slibc/stdio.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">slibc
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_4d4a740b65ecc1faa3510c186d2f00c5.html">slibc</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">stdio.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Contains those _s-functions that are related to stdio.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;stdarg.h&gt;</code><br/>
<code>#include &quot;./base_.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="stddef_8h_source.html">./stddef.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="errno_8h_source.html">./errno.h</a>&quot;</code><br/>
</div>
<p><a href="stdio_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09b140e9e420babafa898f896b581253"></a><!-- doxytag: member="stdio.h::L_tmpnam_s" ref="a09b140e9e420babafa898f896b581253" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a09b140e9e420babafa898f896b581253">L_tmpnam_s</a>&#160;&#160;&#160;25</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the array size required for storing temporary filenames generated by tmpnam_s. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="addf5a05115c692407cb6a1ade786b15f"></a><!-- doxytag: member="stdio.h::TMP_MAX_S" ref="addf5a05115c692407cb6a1ade786b15f" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#addf5a05115c692407cb6a1ade786b15f">TMP_MAX_S</a>&#160;&#160;&#160;TMP_MAX</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">maximum amount of unique filenames, which function tmpnam_s can generate <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">errno_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#adcbc1f57d37cab64e838716b540923de">tmpfile_s</a> (FILE *restrict *restrict streamptr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function creates a temporary file.  <a href="#adcbc1f57d37cab64e838716b540923de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">errno_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a1347d74811c07751994e4a60f04e269e">tmpnam_s</a> (char *s, rsize_t maxsize)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function creates a file or directory name that is unique for the specified temporary directory.  <a href="#a1347d74811c07751994e4a60f04e269e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a9e54d89fa5bc63cee86ac0c77b553e10">gets_s</a> (char *s, rsize_t n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The gets_s function reads one line from stdin into <em>s</em>.  <a href="#a9e54d89fa5bc63cee86ac0c77b553e10"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">errno_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a41bdd93b9ffe818b15ca8959c2dc70c5">fopen_s</a> (FILE *restrict *restrict streamptr, const char *restrict filename, const char *restrict mode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The fopen_s function opens the file specified by <em>filename</em>.  <a href="#a41bdd93b9ffe818b15ca8959c2dc70c5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">errno_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#ad84103bce0da3347584f724a03d97868">freopen_s</a> (FILE *restrict *restrict newstreamptr, const char *restrict filename, const char *restrict mode, FILE *restrict stream)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The freopen_s function opens <em>filename</em> and closes <em>stream</em>.  <a href="#ad84103bce0da3347584f724a03d97868"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#ab23abdde72205874b2fb1dbd62d3f420">sprintf_s</a> (char *restrict s, rsize_t n, const char *restrict format,...) __attribute__((format(printf</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function allows fomatted output into buffer <em>s</em> while taking into account its size.  <a href="#ab23abdde72205874b2fb1dbd62d3f420"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a4772e3cf6be186e274cfb571ecc2a12e">snprintf_s</a> (char *restrict s, rsize_t n, const char *restrict format,...) __attribute__((format(printf</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function allows fomatted output into buffer <em>s</em> while taking into account its size.  <a href="#a4772e3cf6be186e274cfb571ecc2a12e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int int int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a3ff3ddc4dfd8d6853dda4441b8fdf2bc">vsprintf_s</a> (char *restrict s, rsize_t n, const char *restrict format, va_list arg) __attribute__((format(printf</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The vsprintf_s function is equivalent to sprintf_s but expects a va_list argument.  <a href="#a3ff3ddc4dfd8d6853dda4441b8fdf2bc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int int int int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#acebd989cc77ba725898eeab88bb5c83e">vsnprintf_s</a> (char *restrict s, rsize_t n, const char *restrict format, va_list arg) __attribute__((format(printf</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The vsnprintf_s function is equivalent to snprintf_s but expects a va_list argument.  <a href="#acebd989cc77ba725898eeab88bb5c83e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int int int int int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a782409a2522ee4d043b3f9fb0e569bf2">fprintf_s</a> (FILE *restrict stream, const char *restrict format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The fprintf_s function is analogous to the <em>fprintf</em> function except that the <em>n</em> specifier is not allowed.  <a href="#a782409a2522ee4d043b3f9fb0e569bf2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a39e46d0a0dd7ecdfa3f9874e1474c14c">vfprintf_s</a> (FILE *restrict stream, const char *restrict format, va_list arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The vfprintf_s function is equivalent to fprintf_s but expects a va_list argument.  <a href="#a39e46d0a0dd7ecdfa3f9874e1474c14c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#ac120f05917e7c4cae5bedb7ac6981afc">printf_s</a> (const char *restrict format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The printf_s function behaves as fprintf_s when fprintf_s is called with an argument of stdout.  <a href="#ac120f05917e7c4cae5bedb7ac6981afc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#acc1c00849d93d30b42796c197df348db">vprintf_s</a> (const char *restrict format, va_list arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The vprintf_s function is equivalent to printf_s but expects a va_list argument.  <a href="#acc1c00849d93d30b42796c197df348db"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a7ea4b57616b78815bbeee9de4ee262d3">scanf_s</a> (const char *restrict format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The scanf_s function behaves as fscanf_s when fscanf_s is called with an argument of stdin.  <a href="#a7ea4b57616b78815bbeee9de4ee262d3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a8f6ee427a1997b78587adf4d41f6b465">vscanf_s</a> (const char *restrict format, va_list arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The vscanf_s function is equivalent to scanf_s but expects a va_list argument.  <a href="#a8f6ee427a1997b78587adf4d41f6b465"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a40944d5f28ff6a57486294570684ddb4">vsscanf_s</a> (const char *restrict s, const char *restrict format, va_list arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The vsscanf_s function is equivalent to sscanf_s but expects a va_list argument.  <a href="#a40944d5f28ff6a57486294570684ddb4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a1f76ade9689eae85abac54091fef3e4d">sscanf_s</a> (const char *restrict s, const char *restrict format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The sscanf_s function is analogous to fscanf_s but reads from a string instead of a stream.  <a href="#a1f76ade9689eae85abac54091fef3e4d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a011f02b262d1d8023c27dfc9f698ab8a">fscanf_s</a> (FILE *restrict stream, const char *restrict format,...)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A secure variant of fscanf that expects the caller to specify the size for each buffer argument.  <a href="#a011f02b262d1d8023c27dfc9f698ab8a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="stdio_8h.html#a85f7e2ef7805daf256257d5a9cad2932">vfscanf_s</a> (FILE *restrict stream, const char *restrict format, va_list arg)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">vfscanf_s is equivalent to fscanf_s but expects a va_list argument.  <a href="#a85f7e2ef7805daf256257d5a9cad2932"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Contains those _s-functions that are related to stdio. </p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="a41bdd93b9ffe818b15ca8959c2dc70c5"></a><!-- doxytag: member="stdio.h::fopen_s" ref="a41bdd93b9ffe818b15ca8959c2dc70c5" args="(FILE *restrict *restrict streamptr, const char *restrict filename, const char *restrict mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">errno_t <a class="el" href="stdio_8h.html#a41bdd93b9ffe818b15ca8959c2dc70c5">fopen_s</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *restrict *restrict&#160;</td>
          <td class="paramname"><em>streamptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>mode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The fopen_s function opens the file specified by <em>filename</em>. </p>
<dl class="user"><dt><b>Runtime-constraints:</b></dt><dd>A runtime-constraint violation occurs <ul>
<li>streamptr is a null pointer </li>
<li>filename is a null pointer </li>
<li>MODE is a null pointer</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">streamptr</td><td>On success it is set to the opened FILE * stream. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to be opened </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>determines how the file should be opend. It supports the same flags as fopen with some additions.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Zero if the file was successfully opened. Non-zero if it could not open the file or a runtime-constraint violation occurred.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>fopen </dd></dl>

</div>
</div>
<a class="anchor" id="a782409a2522ee4d043b3f9fb0e569bf2"></a><!-- doxytag: member="stdio.h::fprintf_s" ref="a782409a2522ee4d043b3f9fb0e569bf2" args="(FILE *restrict stream, const char *restrict format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int int int int int <a class="el" href="stdio_8h.html#a782409a2522ee4d043b3f9fb0e569bf2">fprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *restrict&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The fprintf_s function is analogous to the <em>fprintf</em> function except that the <em>n</em> specifier is not allowed. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td>the output stream </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>printf-style format flags (n disallowed) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>a variable number of arguments corresponding to the given format flags</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters written a negative value in case of an output error or runtime constraint violation</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>fprintf </dd></dl>

</div>
</div>
<a class="anchor" id="ad84103bce0da3347584f724a03d97868"></a><!-- doxytag: member="stdio.h::freopen_s" ref="ad84103bce0da3347584f724a03d97868" args="(FILE *restrict *restrict newstreamptr, const char *restrict filename, const char *restrict mode, FILE *restrict stream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">errno_t <a class="el" href="stdio_8h.html#ad84103bce0da3347584f724a03d97868">freopen_s</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *restrict *restrict&#160;</td>
          <td class="paramname"><em>newstreamptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>mode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *restrict&#160;</td>
          <td class="paramname"><em>stream</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The freopen_s function opens <em>filename</em> and closes <em>stream</em>. </p>
<dl class="user"><dt><b>Runtime-constraints:</b></dt><dd>A runtime-constraint violation occurs <ul>
<li>newstreamptr is a null pointer </li>
<li>stream is a null pointer </li>
<li>mode is a null pointer</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">newstreamptr</td><td>contains the result of opening <em>filename</em> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>the name of the file to be opened </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>determines how the file should be opened. same meaning as for fopen_s </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td>the stream to be closed</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Zero if the file was successfully opened. Non-zero if it could not open the file or a runtime-constraint violation occurred.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>freopen </dd></dl>

</div>
</div>
<a class="anchor" id="a011f02b262d1d8023c27dfc9f698ab8a"></a><!-- doxytag: member="stdio.h::fscanf_s" ref="a011f02b262d1d8023c27dfc9f698ab8a" args="(FILE *restrict stream, const char *restrict format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#a011f02b262d1d8023c27dfc9f698ab8a">fscanf_s</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *restrict&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A secure variant of fscanf that expects the caller to specify the size for each buffer argument. </p>
<p>The fscanf_s function is equivalent to fscanf but handles the c, s, and [ conversion specifiers differently. These conversion specifiers now expect a pair of arguments: the first one is a pointer to a buffer (as before) while the second one is expected to be of type rsize_t and specifies the size of the buffer.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td></td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td></td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">...</td><td>a variable number of arguments corresponding to the given format string</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>EOF if there was a runtime-constraint violation or an input failure occurred before any conversion. Otherwise the number of successfully assigned input items is returned.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>fscanf </dd></dl>

</div>
</div>
<a class="anchor" id="a9e54d89fa5bc63cee86ac0c77b553e10"></a><!-- doxytag: member="stdio.h::gets_s" ref="a9e54d89fa5bc63cee86ac0c77b553e10" args="(char *s, rsize_t n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="stdio_8h.html#a9e54d89fa5bc63cee86ac0c77b553e10">gets_s</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rsize_t&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The gets_s function reads one line from stdin into <em>s</em>. </p>
<p>Unlike the traditional gets function a second parameter <em>n</em> that specifies the size of <em>s</em> is expected. It is considered a runtime-constraint violation if no newline, EOF or read error occurrs within reading <em>n-1</em> bytes.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">s</td><td>the target buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>the size of <em>s</em> </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The gets_s function returns s if successful. NULL is returned if there was a runtime-constraint violation or if end-of-file is encountered and no caracters have been read into the array or if a read error occured.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>gets </dd></dl>

</div>
</div>
<a class="anchor" id="ac120f05917e7c4cae5bedb7ac6981afc"></a><!-- doxytag: member="stdio.h::printf_s" ref="ac120f05917e7c4cae5bedb7ac6981afc" args="(const char *restrict format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#ac120f05917e7c4cae5bedb7ac6981afc">printf_s</a> </td>
          <td>(</td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The printf_s function behaves as fprintf_s when fprintf_s is called with an argument of stdout. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>printf-style format flags (n disallowed) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>a variable number of arguments corresponding to the given format flags</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters written a negative value in case of an output error or runtime constraint violation</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#a782409a2522ee4d043b3f9fb0e569bf2" title="The fprintf_s function is analogous to the fprintf function except that the n specifier is not allowe...">fprintf_s</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a7ea4b57616b78815bbeee9de4ee262d3"></a><!-- doxytag: member="stdio.h::scanf_s" ref="a7ea4b57616b78815bbeee9de4ee262d3" args="(const char *restrict format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#a7ea4b57616b78815bbeee9de4ee262d3">scanf_s</a> </td>
          <td>(</td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The scanf_s function behaves as fscanf_s when fscanf_s is called with an argument of stdin. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>scanf-style format string </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">...</td><td>a variable number of arguments corresponding to the given format string</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>EOF if there was a runtime-constraint violation or an input failure occurred before any conversion. Otherwise the number of successfully assigned input items is returned.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#a011f02b262d1d8023c27dfc9f698ab8a" title="A secure variant of fscanf that expects the caller to specify the size for each buffer argument...">fscanf_s</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4772e3cf6be186e274cfb571ecc2a12e"></a><!-- doxytag: member="stdio.h::snprintf_s" ref="a4772e3cf6be186e274cfb571ecc2a12e" args="(char *restrict s, rsize_t n, const char *restrict format,...) __attribute__((format(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int int <a class="el" href="stdio__templates___8hpp.html#ad0c89f9e0392dc9c6158ccd6ee6c3261">snprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">char *restrict&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rsize_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function allows fomatted output into buffer <em>s</em> while taking into account its size. </p>
<p>A maximum of n-1 characters are written into the buffer s, followed by a zero byte.</p>
<p>The snprintf_s function is equivalent to the sprintf function except the following. The n specifier (modified or not by flags, field width, or precision) shall not appear in the string pointed to by format.</p>
<p>The snprintf_s function, unlike sprintf_s, will truncate the result to fit within the array pointed to by s.</p>
<p>The output is made only without truncation, if the return value is positive (&gt; 0) and the returned value &lt;n.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">s</td><td>destination buffer containing the output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>size of buffer s </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>format-string (equal to printf) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>a variable number of arguments corresponding to the given format flags</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters that would have been written (not counting the null byte) had the buffer been sufficiently large a negative number in case of a runtime-constraint violation Thus, the output has been completely written if and only if a positive value that is less than n is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="ab23abdde72205874b2fb1dbd62d3f420"></a><!-- doxytag: member="stdio.h::sprintf_s" ref="ab23abdde72205874b2fb1dbd62d3f420" args="(char *restrict s, rsize_t n, const char *restrict format,...) __attribute__((format(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio__templates___8hpp.html#a38b68ddc37d97863a3e6a3cb62a2c082">sprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">char *restrict&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rsize_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function allows fomatted output into buffer <em>s</em> while taking into account its size. </p>
<p>A maximum of n-1 characters are written into the buffer s, followed by a zero byte.</p>
<p>The sprintf_s function is equivalent to the sprintf function except the following. The n specifier (modified or not by flags, field width, or precision) shall not appear in the string pointed to by format.</p>
<p>The sprintf_s function, unlike snprintf_s, treats a result too big for the array pointed to by s as a runtime-constraint violation.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">s</td><td>destination buffer containing the output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>size of buffer s </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>format string (equal to printf) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">...</td><td>a variable number of arguments corresponding to the given format string</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters written (not counting the null byte) a negative number in case of an encoding error 0 in case of runtime-constraint violation </dd></dl>

</div>
</div>
<a class="anchor" id="a1f76ade9689eae85abac54091fef3e4d"></a><!-- doxytag: member="stdio.h::sscanf_s" ref="a1f76ade9689eae85abac54091fef3e4d" args="(const char *restrict s, const char *restrict format,...)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#a1f76ade9689eae85abac54091fef3e4d">sscanf_s</a> </td>
          <td>(</td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The sscanf_s function is analogous to fscanf_s but reads from a string instead of a stream. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>the string to be parsed </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>scanf-style format string </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">...</td><td>a variable number of arguments corresponding to the given format string</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>EOF if there was a runtime-constraint violation or an input failure occurred before any conversion. Otherwise the number of successfully assigned input items is returned. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#a011f02b262d1d8023c27dfc9f698ab8a" title="A secure variant of fscanf that expects the caller to specify the size for each buffer argument...">fscanf_s</a> </dd></dl>

</div>
</div>
<a class="anchor" id="adcbc1f57d37cab64e838716b540923de"></a><!-- doxytag: member="stdio.h::tmpfile_s" ref="adcbc1f57d37cab64e838716b540923de" args="(FILE *restrict *restrict streamptr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">errno_t <a class="el" href="stdio_8h.html#adcbc1f57d37cab64e838716b540923de">tmpfile_s</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *restrict *restrict&#160;</td>
          <td class="paramname"><em>streamptr</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function creates a temporary file. </p>
<p>The temporary file is guaranteed to be different from any other existing file. The file is opend in binary read/write (w+b) mode. When the file is closed or the program teminates the file is removed automatically.</p>
<dl class="remark"><dt><b>Remarks:</b></dt><dd>In contrast to tmpfile, tmpfile_s returns a file with exclusive access and 600 permissions.</dd></dl>
<p>By default, the file is created in /tmp. However, it is possible to change this directory by calling slibc_set_tmp_dir.</p>
<dl class="user"><dt><b>Runtime-constraints:</b></dt><dd>A runtime-constraint violation occurs if <ul>
<li>streamptr is a NULL pointer</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">streamptr</td><td>pointer to the temporary file created</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if the file was created successfully. A non-zero value is returned if the file could not be created or there was a runtime-constraint violation.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>tmpfile </dd></dl>

</div>
</div>
<a class="anchor" id="a1347d74811c07751994e4a60f04e269e"></a><!-- doxytag: member="stdio.h::tmpnam_s" ref="a1347d74811c07751994e4a60f04e269e" args="(char *s, rsize_t maxsize)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">errno_t <a class="el" href="stdio_8h.html#a1347d74811c07751994e4a60f04e269e">tmpnam_s</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rsize_t&#160;</td>
          <td class="paramname"><em>maxsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This function creates a file or directory name that is unique for the specified temporary directory. </p>
<p>The generated file or directory name is guaranteed to be different from any other existing name in the temporary directory. The default temporary directory is /tmp but can be changed via slibc_set_tmp_dir. The output buffer needs to be at least of length L_tmpnam_s if the default directory location of /tmp is used. In case the slibc temporary directory is changed to a longer directory name by calling slibc_set_tmp_dir the output buffer is required to be of size L_tmpnam_s + strlen(set_tmp_dir). Otherwise calling tmpnam_s might fail. (It will never overflow the buffer though). The function is potentially capable of generating TMP_MAX_S different strings.</p>
<dl class="remark"><dt><b>Remarks:</b></dt><dd>Use of this function is normally discouraged because this function does not create the file. It shares this isse wit the traditional tmpnam function. In more detail, a race condition between calling this function and the time of the actual file/directory creation exists. It is, thus, possible that an attacker creates a file with same name in the meantime. Thus, the ISO standard recommends using tmpfile_s where possible. One possible reasonable use of this function is when the user wants to create a temporary directory name. The use of this function is secure in the author's opinion when you have set the temporary directory to a non-shared directory where only your user is allowed to write.</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>[out] On success s will contain the generated unique temporary file name. </td></tr>
    <tr><td class="paramname">maxsize</td><td>[in] The size of s.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Zero on success. A non-zero value is returned in case of a runtime-constraint violation or if no suitable string can be generated.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>tmpnam </dd></dl>

</div>
</div>
<a class="anchor" id="a39e46d0a0dd7ecdfa3f9874e1474c14c"></a><!-- doxytag: member="stdio.h::vfprintf_s" ref="a39e46d0a0dd7ecdfa3f9874e1474c14c" args="(FILE *restrict stream, const char *restrict format, va_list arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#a39e46d0a0dd7ecdfa3f9874e1474c14c">vfprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *restrict&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The vfprintf_s function is equivalent to fprintf_s but expects a va_list argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td>the output stream </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>printf-style format flags (<em>n</em> disallowed) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>va_list initialized by <em>va_start</em> </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters written a negative value in case of an output error or runtime constraint violation</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#a782409a2522ee4d043b3f9fb0e569bf2" title="The fprintf_s function is analogous to the fprintf function except that the n specifier is not allowe...">fprintf_s</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a85f7e2ef7805daf256257d5a9cad2932"></a><!-- doxytag: member="stdio.h::vfscanf_s" ref="a85f7e2ef7805daf256257d5a9cad2932" args="(FILE *restrict stream, const char *restrict format, va_list arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#a85f7e2ef7805daf256257d5a9cad2932">vfscanf_s</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *restrict&#160;</td>
          <td class="paramname"><em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>vfscanf_s is equivalent to fscanf_s but expects a va_list argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td>the input stream </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>the format string </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">arg</td><td>contains the variable argument list initialized by the va_start macro</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>EOF if there was a runtime-constraint violation or an input failure occurred before any conversion. Otherwise the number of successfully assigned input items is returned.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#a011f02b262d1d8023c27dfc9f698ab8a" title="A secure variant of fscanf that expects the caller to specify the size for each buffer argument...">fscanf_s</a> </dd></dl>

</div>
</div>
<a class="anchor" id="acc1c00849d93d30b42796c197df348db"></a><!-- doxytag: member="stdio.h::vprintf_s" ref="acc1c00849d93d30b42796c197df348db" args="(const char *restrict format, va_list arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#acc1c00849d93d30b42796c197df348db">vprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The vprintf_s function is equivalent to printf_s but expects a va_list argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>printf-style format string </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters written a negative value in case of an output error or runtime constraint violation</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#ac120f05917e7c4cae5bedb7ac6981afc" title="The printf_s function behaves as fprintf_s when fprintf_s is called with an argument of stdout...">printf_s</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a8f6ee427a1997b78587adf4d41f6b465"></a><!-- doxytag: member="stdio.h::vscanf_s" ref="a8f6ee427a1997b78587adf4d41f6b465" args="(const char *restrict format, va_list arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#a8f6ee427a1997b78587adf4d41f6b465">vscanf_s</a> </td>
          <td>(</td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The vscanf_s function is equivalent to scanf_s but expects a va_list argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td></td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">arg</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>EOF if there was a runtime-constraint violation or an input failure occurred before any conversion. Otherwise the number of successfully assigned input items is returned.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#a7ea4b57616b78815bbeee9de4ee262d3" title="The scanf_s function behaves as fscanf_s when fscanf_s is called with an argument of stdin...">scanf_s</a> </dd></dl>

</div>
</div>
<a class="anchor" id="acebd989cc77ba725898eeab88bb5c83e"></a><!-- doxytag: member="stdio.h::vsnprintf_s" ref="acebd989cc77ba725898eeab88bb5c83e" args="(char *restrict s, rsize_t n, const char *restrict format, va_list arg) __attribute__((format(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int int int int <a class="el" href="stdio_8h.html#acebd989cc77ba725898eeab88bb5c83e">vsnprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">char *restrict&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rsize_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The vsnprintf_s function is equivalent to snprintf_s but expects a va_list argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">s</td><td>destination buffer containing the output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>size of buffer s </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>format-string (equal to printf) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>a variable number of arguments corresponding to the given format flags</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters that would have been written (not counting the null byte) had the buffer been sufficiently large a negative number in case of a runtime-constraint violation Thus, the output has been completely written if and only if a positive value that is less than n is returned.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio__templates___8hpp.html#ad0c89f9e0392dc9c6158ccd6ee6c3261" title="This function provides for fomatted output into buffer s while taking into account the size of s...">snprintf_s</a> </dd></dl>

<p>Referenced by <a class="el" href="stdio__templates___8hpp.html#ad0c89f9e0392dc9c6158ccd6ee6c3261">snprintf_s()</a>.</p>

</div>
</div>
<a class="anchor" id="a3ff3ddc4dfd8d6853dda4441b8fdf2bc"></a><!-- doxytag: member="stdio.h::vsprintf_s" ref="a3ff3ddc4dfd8d6853dda4441b8fdf2bc" args="(char *restrict s, rsize_t n, const char *restrict format, va_list arg) __attribute__((format(printf" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int int int <a class="el" href="stdio_8h.html#a3ff3ddc4dfd8d6853dda4441b8fdf2bc">vsprintf_s</a> </td>
          <td>(</td>
          <td class="paramtype">char *restrict&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">rsize_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The vsprintf_s function is equivalent to sprintf_s but expects a va_list argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">s</td><td>destination buffer containing the output </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>size of buffer s </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>format-string (equal to printf) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">arg</td><td>list of variable arguments.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of characters written (not counting the null byte) a negative number in case of an encoding error 0 in case of runtime-constraint violation</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio__templates___8hpp.html#a38b68ddc37d97863a3e6a3cb62a2c082" title="This function provides for fomatted output into buffer s while taking into account the size of s...">sprintf_s</a> </dd></dl>

<p>Referenced by <a class="el" href="stdio__templates___8hpp.html#a38b68ddc37d97863a3e6a3cb62a2c082">sprintf_s()</a>.</p>

</div>
</div>
<a class="anchor" id="a40944d5f28ff6a57486294570684ddb4"></a><!-- doxytag: member="stdio.h::vsscanf_s" ref="a40944d5f28ff6a57486294570684ddb4" args="(const char *restrict s, const char *restrict format, va_list arg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="stdio_8h.html#a40944d5f28ff6a57486294570684ddb4">vsscanf_s</a> </td>
          <td>(</td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *restrict&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">va_list&#160;</td>
          <td class="paramname"><em>arg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The vsscanf_s function is equivalent to sscanf_s but expects a va_list argument. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>the string to be parsed </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>scanf-style format string </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">arg</td><td>va_list argument</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>EOF if there was a runtime-constraint violation or an input failure occurred before any conversion. Otherwise the number of successfully assigned input items is returned.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="stdio_8h.html#a1f76ade9689eae85abac54091fef3e4d" title="The sscanf_s function is analogous to fscanf_s but reads from a string instead of a stream...">sscanf_s</a> </dd></dl>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Wed Oct 31 2012 13:48:20 for slibc by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
